Skip to content

add ios example - #119

Merged
Ethella merged 1 commit into
mainfrom
jerry/ios-headless-email-otp-docs
Jun 30, 2026
Merged

add ios example#119
Ethella merged 1 commit into
mainfrom
jerry/ios-headless-email-otp-docs

Conversation

@Ethella

@Ethella Ethella commented Jun 30, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds iOS documentation for running Email OTP login in a headless mode (showUI: false), including an event-driven flow and the relevant event enums used to drive custom UI.

Changes:

  • Documented headless Email OTP login for iOS (showUI: false) and the MagicEventPromise<String> event-driven interaction model
  • Added an end-to-end Swift example covering Email OTP, MFA, and device verification events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


**Events**

Events are grouped into four enums under `AuthModule`, mirroring the `@magic-sdk/types` design:
Comment on lines +277 to +284
emailOTPHandle = magic.auth.loginWithEmailOTP(configuration, eventLog: true)

// — Email OTP —
.on(eventName: AuthModule.LoginWithEmailOTPEventOnReceived.emailOTPSent.rawValue) { [weak self] in
// Prompt the user for the OTP they received by email, then:
let otp = "123456" // value collected from your own UI
self?.emailOTPHandle?.emit(eventType: AuthModule.LoginWithEmailOTPEventEmit.verifyEmailOTP.rawValue, arg: otp)
}
@Ethella
Ethella merged commit a17382a into main Jun 30, 2026
1 check passed
@Ethella
Ethella deleted the jerry/ios-headless-email-otp-docs branch June 30, 2026 20:58
@mintlify

mintlify Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
magic-labs 🔴 Failed Jun 30, 2026, 9:15 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants